<template>
	<view class="myself-box">
		<view class="meself-info">
			<view class="meself-info__top">
				<u-avatar :showLoading="true" :src="userInfo.headImg" width="80rpx" height="80rpx" shape="circle"></u-avatar>
				<view class="user-name">{{ userInfo.username }}</view>
			</view>
			<view>
				<view class="">id: {{ userInfo.id }}</view>
				<view class="meself-info__bottom">
					<view class="phone-box">
						<text class="phone-text">手机号：{{ userInfo.phone }}</text>
						<!-- <u-icon name="edit-pen" color="#fff"></u-icon> -->
					</view>
					<!-- <view class=""><u-button :hairline="true" size="mini" text="购买会员"></u-button></view> -->
				</view>
			</view>
		</view>
		<myselfMenu />
	</view>
</template>

<script>
import myselfMenu from './components/menu.vue';
export default {
	components: { myselfMenu },
	data() {
		return {
			userInfo: this.$store.state.userInfo // 缓存的用户详情
		};
	}
};
</script>

<style lang="scss">
.myself-box {
	padding: 30rpx;
	.meself-info {
		padding: 30rpx 30rpx 20rpx;
		color: #fff;
		font-size: 24rpx;
		height: 240rpx;
		border-radius: 10rpx;
		display: flex;
		flex-flow: column;
		justify-content: space-between;
		background: $u-success;
		&__bottom,
		&__top {
			display: flex;
		}
		&__top {
			line-height: 80rpx;
			.user-name {
				margin-left: 10rpx;
				font-size: 32rpx;
			}
		}
		&__bottom {
			justify-content: space-between;
			.phone-box {
				display: flex;
				margin-top: 5rpx;
				.phone-text {
					margin-right: 10rpx;
					display: inline-block;
				}
			}
		}
	}
}
</style>
